﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CS控制台测试区
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> destlist = new List<int>();
            destlist.Add(1);
            destlist.Add(2);
            destlist.Add(3);
            destlist.Add(4);
            destlist.Add(5);
            int result = -1;
            for (int i=1;i<6;i++)
            {
                Console.WriteLine(
                    destlist.Find(index => {
                    if (index == i)
                        result = index;
                    else
                        result = -1;
                    return true;
                })
                );
                Console.WriteLine(result);
                destlist.Find(index => {
                    if (index == i)
                        result = index;
                    else
                        result = -1;
                    Console.WriteLine(result);
                    return true;
                });
        }
           
            
            

        }
    }
}
